﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/SiteManage.Master" AutoEventWireup="true" CodeBehind="QuanLiKhachHang.aspx.cs" Inherits="NXBSaiGon.Admin.QuanLiKhachHang" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div style="text-align:center">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AutoGenerateColumns="False" CellPadding="4" DataKeyNames="MaKhachHang" 
    DataSourceID="SqlDataSource1" 
    EmptyDataText="There are no data records to display." ForeColor="#333333" 
    GridLines="None" PageSize="5" Width="907px">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:HyperLinkField DataNavigateUrlFields="MaKhachHang" 
            DataNavigateUrlFormatString="~/Admin/Khachhang.aspx?MaKhachHang={0}" 
            DataTextField="TenKhachHang" HeaderText="TenKhachHang" />
        <asp:BoundField DataField="DiaChi" HeaderText="DiaChi" 
            SortExpression="DiaChi" />
        <asp:BoundField DataField="DienThoai" HeaderText="DienThoai" 
            SortExpression="DienThoai" />
        <asp:BoundField DataField="Email" HeaderText="Email" 
            SortExpression="Email" />
        <asp:BoundField DataField="CMND" HeaderText="CMND" SortExpression="CMND" />
        <asp:BoundField DataField="Username" HeaderText="Username" 
            SortExpression="Username" />
        <asp:BoundField DataField="Password" HeaderText="Password" 
            SortExpression="Password" />
        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
    </Columns>
    <EditRowStyle BackColor="#7C6F57" />
    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#E3EAEB" />
    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
    <SortedAscendingCellStyle BackColor="#F8FAFA" />
    <SortedAscendingHeaderStyle BackColor="#246B61" />
    <SortedDescendingCellStyle BackColor="#D4DFE1" />
    <SortedDescendingHeaderStyle BackColor="#15524A" />
</asp:GridView>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:NXBSaiGonConnectionString1 %>" 
    DeleteCommand="DELETE FROM [KhachHang] WHERE [MaKhachHang] = @MaKhachHang" 
    InsertCommand="INSERT INTO [KhachHang] ([TenKhachHang], [DiaChi], [DienThoai], [Email], [CMND], [Username], [Password]) VALUES (@TenKhachHang, @DiaChi, @DienThoai, @Email, @CMND, @Username, @Password)" 
    ProviderName="<%$ ConnectionStrings:NXBSaiGonConnectionString1.ProviderName %>" 
    SelectCommand="SELECT [MaKhachHang], [TenKhachHang], [DiaChi], [DienThoai], [Email], [CMND], [Username], [Password] FROM [KhachHang]" 
    UpdateCommand="UPDATE [KhachHang] SET [TenKhachHang] = @TenKhachHang, [DiaChi] = @DiaChi, [DienThoai] = @DienThoai, [Email] = @Email, [CMND] = @CMND, [Username] = @Username, [Password] = @Password WHERE [MaKhachHang] = @MaKhachHang">
    <DeleteParameters>
        <asp:Parameter Name="MaKhachHang" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="TenKhachHang" Type="String" />
        <asp:Parameter Name="DiaChi" Type="String" />
        <asp:Parameter Name="DienThoai" Type="String" />
        <asp:Parameter Name="Email" Type="String" />
        <asp:Parameter Name="CMND" Type="String" />
        <asp:Parameter Name="Username" Type="String" />
        <asp:Parameter Name="Password" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="TenKhachHang" Type="String" />
        <asp:Parameter Name="DiaChi" Type="String" />
        <asp:Parameter Name="DienThoai" Type="String" />
        <asp:Parameter Name="Email" Type="String" />
        <asp:Parameter Name="CMND" Type="String" />
        <asp:Parameter Name="Username" Type="String" />
        <asp:Parameter Name="Password" Type="String" />
        <asp:Parameter Name="MaKhachHang" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>

<br />
<br />
    

</asp:Content>
